#include "BackgroundStage.h"

namespace egg{

    BackgroundStage::BackgroundStage(){
        mShader=gShaderLib.getShader("background");
        mQuad=gGeometryLib.getGeometry("quad");
        mParamMap.bindShader(mShader);
        mColor=mParamMap.getTextureParam("uni_sampler2D_color");
    }

    void BackgroundStage::doRender(const FrameEvent& evt,TexturePtr background){
        mColor->mTexture=background;
        mParamMap._commitParamsForce();
        mQuad->draw();
    }

}